home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
evalti.zip
/
EVALTIME.DOC
next >
Wrap
Text File
|
1994-01-01
|
3KB
|
100 lines
================================================================================
Copyright (c) 1994 Christopher A. Zielinski
================================================================================
Christopher A. Zielinski, (CIS: 72723,2701)
(416) 767-9674 9am-5pm EST voice/fax
94.01.01
TimeEval() is an event-driven, Clipper 5.2c function that will evaluate a
Clipper code block every nth seconds. Note, the computers interal clock
provides the event of time changing.
Copyright & Disclaimer
======================
This package is Copyrighted (c) 1994, however, permission is granted for use
in any finished program, commercial or otherwise. Permission is not granted
to include these routines in third party commercial or shareware LIBRARIES.
Use of the information, source code, and library are strictly at the risk of
the user, and the author will not be responsible for any damage incurred,
either from direct use or otherwise.
Acknowledgments
===============
Rick Spence, who has been a great teacher, especially with those little
glitches in his examples that force you to understand the material taught. In
particular, his article "Understanding the item API" in Clipper Advisor --
January/February 1994, which assisted in calling Clipper from C.
Brenton Farmer, (CIS: 71621,627) who inspired the whole thing. Although his
original work did not function properly -- it was a very good attempt and
provided a good concept to work from.
Computer Associates, who gave us Clipper 5.2c that provided a legitimate way of
calling Clipper from C, (no need to poke around with undocumented internal
functions). And a special thanks to David Lyon, who pointed out that printf()
allocates memory.
Hackers, who document the undocumented.
CIBC, who gave me my first programming job and introduced me to Clipper.
Usage
=====
1. Never overlay EvalTime.LIB or the ISR_Routine module in EvalTime.LIB!
Note, the standard RTLink supplied with Clipper 5.2c cannot overlay
these.
2. Clipper syntax of TimeEval:
TimeEval( nEveryNthSec, cCodeBlockAsString ) --> NIL
This is the only procedure to be called by the developer. Note, the
code block will not be evaluated while the Clipper error system has
control.
Called with more/less parameters, removes TimeEval() from system.
nEveryNthSec --> is how often cCodeBlockAsString is evaluated
in terms of seconds.
cCodeBlockAsString --> is a string representation of a complete
code block expression. Note, the return
value of the code block will be lost.
Example:
PROCEDURE Main()
REQUEST QOUT
CLS
// Install time evaluater
TimeEval( 1, "{ || QOUT( TIME() ) }" )
// Wait
Inkey( 0 )
// Remove time evaluater
TimeEval()
RETURN
3. Review the source code if you plan on altering Clipper 5.2c's standard
error handling system while TimeEval() is installed.